﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="UMLTouch.UI.Start.Views.ApplicationView"
	MinHeight="400" MinWidth="500"
           >
    
    <UserControl.Resources>
        <ResourceDictionary>
        	<ResourceDictionary.MergedDictionaries>
        		<ResourceDictionary Source="/UMLTouch.UI.Start;Component/UMLTouchResources.xaml"/>
        	</ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
	
    
    <DockPanel x:Name="ContentPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{DynamicResource WindowBackgroundBrush}">

        <Menu KeyboardNavigation.TabNavigation="Cycle" DockPanel.Dock="Top" Background="{x:Null}">
            <MenuItem Header="_New Diagram" Command="{Binding NewDiagramCmd}" Background="{x:Null}" />
        </Menu>
        
        <ItemsControl ItemsSource="{Binding Popups}" d:IsHidden="True" ItemTemplate="{DynamicResource PopupDataTemplate}">
        </ItemsControl>
        
        <TabControl x:Name="tabControl" IsSynchronizedWithCurrentItem="True"     
                    Margin="19,20,20,20" BorderThickness="1"
                    Visibility="{Binding DisplayContext}" ItemsSource="{Binding OpenedDiagrams}" Padding="0" BorderBrush="{DynamicResource PopupBorderBrush}" ItemContainerStyle="{DynamicResource DrawingContextTabitem}">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <ContentPresenter 
                    Content="{Binding Name}" 
                    VerticalAlignment="Center" 
                    />
                </DataTemplate>
            </TabControl.ItemTemplate>
        </TabControl>

    </DockPanel>
</UserControl>
